package cn.kgc.ssm.web.controller;

import cn.kgc.ssm.web.response.ResponseResult;
import cn.kgc.ssm.web.service.LogInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 课工场
 * @date 2024/8/5
 * @description  日志模块
 */

@RestController
@RequestMapping("logs")
public class LogInfoController {

    @Autowired
    private LogInfoService logInfoService;

    // 分页
    @GetMapping("page")
    public ResponseResult logInfoPage(Integer page,Integer limit ,String model,String description){
        return logInfoService.logInfoPage(page,limit,model,description);
    }

    @PostMapping("delete")
    public ResponseResult deleteLogInfo(@RequestBody List<Integer> ids) {

        System.out.println("ids = " + ids);
        return logInfoService.deleteLogInfo(ids);
    }

}
